package com.ws.client.action;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CLoginActionTest {
	/*@Test
	public void testSchemaExport(){
		new SchemaExport(new AnnotationConfiguration().configure()).create(true,true);
	}*/

	@Test
	public void testExecute() {
		ApplicationContext ac=new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"});
		CLoginAction cLoginAction=(CLoginAction) ac.getBean("cLoginAction");
		String str=null;
		try {
			str=cLoginAction.execute();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("结果："+str);
	}

}
